package reflect;

import reflect.annotations.AutoRunClass;
import reflect.annotations.AutoRunMethod;

@AutoRunClass
public class Student {
    private String name = "王五",address = "北京";

    public Student() {
    }

    public Student(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public void myName(){
        System.out.println(name + ":我的名字叫" + name);
    }

    @AutoRunMethod(4)
    public void myAddress(){
        System.out.println(name + ":我的住址是" + address);
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
